package com.lry.crawlers.util;

import com.lry.crawlers.cartoon.entity.CartoonVariable;
import com.lry.crawlers.fiction.entity.FictionVariable;
import com.lry.crawlers.video.entity.VideoVariable;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;
@Component
public class ProcessVariable {
    public static Map<Integer, FictionVariable> fVariable = new HashMap<>();
    public static Map<Integer, CartoonVariable> cVariable = new HashMap<>();
    public static Map<Integer, VideoVariable> vVariable = new HashMap<>();

    public static void setFVariable(Integer key, FictionVariable variable){
        fVariable.put(key,variable);
    }

    public static FictionVariable getFVariable(Integer key) {
        return fVariable.get(key);
    }


    public static void setCVariable(Integer key, CartoonVariable variable){
        cVariable.put(key,variable);
    }

    public static CartoonVariable getCVariable(Integer key) {
        return cVariable.get(key);
    }

    public static void setVVariable(Integer key, VideoVariable variable){
        vVariable.put(key,variable);
    }

    public static VideoVariable getVVariable(Integer key) {
        return vVariable.get(key);
    }

}
